// 导入 vue-router 插件
import VueRouter from 'vue-router'

// 导入相对应的路由组件
import HomeContainer from './components/tabbar/HomeContainer.vue'
import ClassifyContainer from './components/tabbar/ClassifyContainer.vue'
import ShopcarContainer from './components/tabbar/ShopcarContainer.vue'
import PersonalContainer from './components/tabbar/PersonalContainer.vue'

// 创建路由组件
var router = new VueRouter({
    routes: [   // 配置路由规则
        {
            path : '/',
            redirect : '/home'
        },
        {
            path: '/home',
            component: HomeContainer
        },
        {
            path: '/classify',
            component: ClassifyContainer
        },
        {
            path: '/shopcar',
            component: ShopcarContainer
        },
        {
            path: '/personal',
            component: PersonalContainer
        },
    ],
    linkActiveClass : 'mui-active' // 覆盖默认的路由高亮的类，默认的类叫做 router-link-active
})

// 把路由对象暴露出去
export default router